package com.andox.fn.inf.rpc.rest.example.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.andox.fn.inf.rpc.rest.example.UserService;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@ImportResource("classpath:rpc-consumer.xml")
//@RestController
//@Profile("consumer")
public class Consumer {
	public static void main(String[] args) {
		SpringApplication.run(Consumer.class, args);
	}
	
	@Autowired
	private UserService userService;
	
	@RequestMapping("list")
	public Object userInfo() {
		return this.userService.list();
	}
}
